def hammingDistance(a,b):
    return bin(a ^ b).count('1')#异或后输出1的个数


if __name__ == "__main__":
    a = input()
    b = input()
    print(hammingDistance(int(a),int(b)))